// { "framework": "Vue"} 
if(typeof app=="undefined"){app=weex}
if(typeof eeuiLog=="undefined"){var eeuiLog={_:function(t,e){var s=e.map(function(e){return e="[object object]"===Object.prototype.toString.call(e).toLowerCase()?JSON.stringify(e):e});if(typeof this.__m==='undefined'){this.__m=app.requireModule('debug')}this.__m.addLog(t,s)},debug:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];this._("debug",e)},log:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];this._("log",e)},info:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];this._("info",e)},warn:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];this._("warn",e)},error:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];this._("error",e)}}}
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/pages/member/coupon/coupon.vue?entry=true");
/******/ })
/************************************************************************/
/******/ ({

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib/index.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/components/myNavbar/myNavbar.vue":
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!/usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/components/myNavbar/myNavbar.vue ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _entry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../entry.js */ "./src/entry.js");
/* harmony import */ var _entry_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_entry_js__WEBPACK_IMPORTED_MODULE_0__);
//
//
//
//
//
//
//
//
//
//

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
  data: function data() {
    return {
      statusBarHeight: eeui.getStatusBarHeightPx()
    };
  },
  created: function created() {
    this.initIconFont();
  },
  props: {
    title: String,
    back: {
      "default": true
    }
  },
  methods: {
    backClick: function backClick() {
      if (this.back) {
        eeui.closePage();
      }
    }
  }
});

/***/ }),

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib/index.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/pages/member/coupon/coupon.vue":
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!/usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/pages/member/coupon/coupon.vue ***!
  \**********************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _entry_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../entry.js */ "./src/entry.js");
/* harmony import */ var _entry_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_entry_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _api_coupon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../api/coupon */ "./src/api/coupon.js");
/* harmony import */ var _api_cart__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../api/cart */ "./src/api/cart.js");
/* harmony import */ var _api_product__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../api/product */ "./src/api/product.js");
/* harmony import */ var _components_myNavbar_myNavbar_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../components/myNavbar/myNavbar.vue */ "./src/components/myNavbar/myNavbar.vue");
/* harmony import */ var _components_myNavbar_myNavbar_vue__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_components_myNavbar_myNavbar_vue__WEBPACK_IMPORTED_MODULE_4__);
//
//
//
//
//
//
//
//
//
//

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ __webpack_exports__["default"] = ({
  name: '',
  data: function data() {
    return {
      currentTab: 0,
      loadinging: false,
      refreshing: false,
      allHeight: '1000px',
      coupon: {
        mchName: '',
        mchLogo: ','
      },
      fullReductionCouponList: [],
      exchangeCouponList: [],
      discountCouponList: [],
      productId: '',
      quantity: 0
    };
  },
  created: function created() {
    // 在实例创建完成后被立即调用
    this.getCouponData();
  },
  methods: {
    bindChange: function bindChange(e) {
      this.currentTab = e.index;

      if (e.index == 0) {
        this.allHeight = this.fullReductionCouponList.length * 300 + 60 + 'px';
      } else if (e.index == 1) {
        this.allHeight = this.discountCouponList.length * 300 + 60 + 'px';
      } else if (e.index == 2) {
        this.allHeight = this.exchangeCouponList.length * 300 + 60 + 'px';
      }
    },
    swichNav: function swichNav(e) {
      if (e == 0) {
        this.allHeight = this.fullReductionCouponList.length * 300 + 60 + 'px';
      } else if (e == 1) {
        this.allHeight = this.discountCouponList.length * 300 + 60 + 'px';
      } else if (e == 2) {
        this.allHeight = this.exchangeCouponList.length * 300 + 60 + 'px';
      }

      if (this.currentTab == e) {
        return false;
      } else {
        this.currentTab = e;
      }
    },
    //获取优惠券的数据
    getCouponData: function getCouponData() {
      var _this2 = this;

      Object(_api_coupon__WEBPACK_IMPORTED_MODULE_1__["list"])({
        pageSize: 1000
      }).then(function (res) {
        _this2.coupon.mchName = res.data.data[0].mchName;
        _this2.coupon.mchLogo = res.data.data[0].mchLogo;
        res.data.data.forEach(function (item) {
          if (item.endDate == null) {
            item.endDate = "永久有效";
          } else {
            item.endDate = _this2.formatTime(item.endDate);
          }

          if (item.type === 0) {
            _this2.fullReductionCouponList.push(item);
          } else if (item.type === 1) {
            _this2.discountCouponList.push(item);
          } else if (item.type === 3) {
            _this2.exchangeCouponList.push(item);
          }
        });

        if (_this2.fullReductionCouponList.length > 0) {
          _this2.allHeight = _this2.fullReductionCouponList.length * 300 + 60 + 'px';
        }
      });
    },
    //优惠券去使用的点击事件
    useCoupon: function useCoupon(id) {
      eeuiLog.info("点击跳转到对应的页面");
      this.productId = id;
      this.findClick();
    },
    findClick: function findClick() {
      var _this = this;

      Object(_api_product__WEBPACK_IMPORTED_MODULE_3__["find"])(_this.productId).then(function (res) {
        eeuiLog.log(res);

        if (res.data.products[0].minLimit > 0) {
          _this.quantity = res.data.products[0].minLimit;
        } else {
          _this.quantity = 1;
        }

        _this.buyNowClick();
      })["catch"](function (error) {
        eeuiLog.log(error);
      });
    },
    buyNowClick: function buyNowClick() {
      var _this = this;

      var data = {};
      data.productId = _this.productId;
      data.promotionId = "";
      data.quantity = _this.quantity;
      data.uuid = _this.getGlobalData().uuid, eeuiLog.log(data);
      Object(_api_cart__WEBPACK_IMPORTED_MODULE_2__["buyNow"])(data).then(function (res) {
        if (res.type == 'success') {
          eeui.openPage({
            url: 'root://pages/goods/submit/index.js',
            statusBarType: "immersion",
            statusBarStyle: false
          }, function (result) {});
        }
      })["catch"](function (error) {
        eeuiLog.log(error);
        eeui.toast(error);
      });
    }
  },
  components: {
    myNavbar: _components_myNavbar_myNavbar_vue__WEBPACK_IMPORTED_MODULE_4___default.a
  }
});

/***/ }),

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-0ae5e94f!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/components/myNavbar/myNavbar.vue":
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-0ae5e94f!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/components/myNavbar/myNavbar.vue ***!
  \**************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {
  "navbar": {
    "width": "750",
    "height": "100"
  },
  "text": {
    "fontSize": "36"
  },
  "status-bar": {
    "backgroundColor": "#FFFFFF"
  },
  "iconLeft": {
    "color": "#000000",
    "fontSize": "30",
    "paddingLeft": "30",
    "paddingRight": "30",
    "fontFamily": "iconfont2"
  }
}

/***/ }),

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-358ef8fe!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/pages/member/coupon/coupon.vue":
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-358ef8fe!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/pages/member/coupon/coupon.vue ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = {
  "app": {
    "flex": 1,
    "backgroundColor": "rgba(248,248,248,0.8)"
  },
  "navbar": {
    "width": "750",
    "height": "100"
  },
  "swiper-item-box": {
    "flex": 1,
    "width": "750"
  },
  "refresh": {
    "height": "60",
    "width": "750",
    "display": "flex",
    "MsFlexAlign": "center",
    "WebkitAlignItems": "center",
    "WebkitBoxAlign": "center",
    "justifyContent": "center",
    "alignItems": "center",
    "flexDirection": "row"
  },
  "loading": {
    "justifyContent": "center",
    "height": "50",
    "width": "750",
    "display": "flex",
    "MsFlexAlign": "center",
    "WebkitAlignItems": "center",
    "WebkitBoxAlign": "center",
    "flexDirection": "row",
    "alignItems": "center"
  },
  "indicator": {
    "marginTop": "16",
    "height": "40",
    "width": "40"
  },
  "coupon_choose": {
    "width": "750",
    "textAlign": "center",
    "paddingLeft": "26",
    "paddingRight": "26",
    "boxSizing": "border-box",
    "display": "flex",
    "height": "100",
    "flexDirection": "row",
    "backgroundColor": "rgb(253,253,253)"
  },
  "coupon_choose-list": {
    "width": "250",
    "display": "flex",
    "flexDirection": "column",
    "alignItems": "center",
    "justifyContent": "flex-end"
  },
  "coupon_choose_title_no": {
    "fontSize": "28",
    "fontWeight": "400",
    "color": "rgba(26,26,30,1)",
    "display": "block",
    "paddingBottom": "25"
  },
  "coupon_choose_title": {
    "fontSize": "28",
    "fontWeight": "400",
    "color": "rgba(215,38,28,1)",
    "display": "block",
    "paddingBottom": "25"
  },
  "swiper-box": {
    "display": "block",
    "flex": 1,
    "width": "750"
  },
  "coupon_choose_line": {
    "width": "49",
    "height": "10",
    "borderRadius": "1",
    "backgroundColor": "#FFFFFF"
  },
  "coupon_choose_line_no": {
    "width": "49",
    "height": "10",
    "borderRadius": "1",
    "backgroundImage": "linear-gradient(to top, rgba(231, 91, 83, 1), rgba(246, 171, 171, 1))"
  },
  "coupon-shopList": {
    "marginTop": "40",
    "marginRight": "30",
    "marginBottom": 0,
    "marginLeft": "30",
    "paddingTop": "30",
    "paddingRight": "20",
    "paddingBottom": "30",
    "paddingLeft": "20",
    "backgroundColor": "rgba(255,255,255,1)",
    "borderRadius": "16",
    "width": "690",
    "flex": 1
  },
  "coupon-couponList-top": {
    "display": "flex",
    "flexDirection": "row",
    "alignItems": "center"
  },
  "mchName": {
    "fontSize": "30",
    "fontFamily": "STSongti",
    "fontWeight": "900"
  },
  "mchLogo": {
    "width": "50",
    "height": "50",
    "borderRadius": 50,
    "marginRight": "30"
  },
  "coupon-couponList": {
    "display": "flex",
    "flexDirection": "row",
    "alignItems": "center",
    "paddingTop": "30",
    "paddingRight": "30",
    "paddingBottom": "30",
    "paddingLeft": "30",
    "width": "650",
    "backgroundColor": "#FEF7EF",
    "borderRadius": "16",
    "color": "#FF1010",
    "marginTop": "30"
  },
  "coupon-couponList-port1": {
    "marginRight": "20",
    "width": "130",
    "height": "130"
  },
  "coupon-couponList-port1-inner": {
    "width": "130",
    "height": "130",
    "justifyContent": "center",
    "display": "flex",
    "flexDirection": "row",
    "alignItems": "center"
  },
  "coupon-couponList-port1-text1": {
    "color": "#FF1010",
    "fontSize": "24",
    "paddingTop": "20"
  },
  "coupon-couponList-port1-text2": {
    "fontSize": "60",
    "color": "#FF1010",
    "marginRight": "10"
  },
  "coupon-couponList-port2": {
    "marginRight": "20"
  },
  "coupon-couponList-port2-text1": {
    "fontSize": "30",
    "color": "#FF1010",
    "fontWeight": "700",
    "marginBottom": "10"
  },
  "coupon-couponList-port2-text2": {
    "fontSize": "24",
    "color": "#F48583",
    "marginBottom": "5"
  },
  "coupon-couponList-port2-text3": {
    "fontSize": "24",
    "color": "#F48583"
  },
  "coupon-couponList-port3": {
    "height": "36",
    "lineHeight": "40",
    "flexGrow": 1,
    "color": "#F48583",
    "fontSize": "24",
    "border": "solid 1px #F48583",
    "borderRadius": "30",
    "textAlign": "center",
    "paddingTop": "5",
    "paddingRight": "5",
    "paddingBottom": "5",
    "paddingLeft": "5",
    "flex": 1,
    "display": "flex",
    "flexDirection": "column",
    "alignItems": "center",
    "borderWidth": "1",
    "borderStyle": "solid",
    "borderColor": "#F48583"
  },
  "coupon-none": {
    "display": "flex",
    "alignItems": "center",
    "justifyContent": "center",
    "width": "750",
    "flex": 1
  },
  "coupon-none-image": {
    "textAlign": "center",
    "display": "block",
    "marginTop": 0,
    "marginBottom": 0,
    "width": "200",
    "height": "200"
  },
  "coupon-none-text": {
    "display": "flex",
    "flexDirection": "row",
    "justifyContent": "center",
    "letterSpacing": "5",
    "fontSize": "26",
    "fontWeight": "400",
    "color": "#666666",
    "lineHeight": "42",
    "marginTop": "30"
  },
  "gap": {
    "height": "50"
  },
  "coupon-couponList-port3_Title": {
    "color": "#F48583",
    "fontSize": "24"
  }
}

/***/ }),

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-0ae5e94f!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/components/myNavbar/myNavbar.vue":
/*!**********************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-0ae5e94f!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/components/myNavbar/myNavbar.vue ***!
  \**********************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', [_c('div', {
    staticClass: ["status-bar"],
    style: {
      height: _vm.statusBarHeight + 'px'
    }
  }), _c('navbar', {
    staticClass: ["navbar"],
    style: {
      backgroundColor: 'white'
    }
  }, [_c('navbar-item', {
    attrs: {
      "type": "left"
    },
    on: {
      "click": _vm.backClick
    }
  }, [(_vm.back) ? _c('div', [_c('text', {
    staticClass: ["iconLeft"]
  }, [_vm._v("")])]) : _vm._e()]), _c('navbar-item', {
    attrs: {
      "type": "title"
    }
  }, [_c('text', {
    staticClass: ["text"]
  }, [_vm._v(_vm._s(_vm.title))])])], 1)], 1)
},staticRenderFns: []}
module.exports.render._withStripped = true

/***/ }),

/***/ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-358ef8fe!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/pages/member/coupon/coupon.vue":
/*!********************************************************************************************************************************************************************************************************************************************************!*\
  !*** /usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-358ef8fe!/usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/pages/member/coupon/coupon.vue ***!
  \********************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', {
    staticClass: ["app"]
  }, [_c('myNavbar', {
    attrs: {
      "title": "优惠券"
    }
  }), _c('div', {
    staticClass: ["coupon_choose"]
  }, [_c('div', {
    staticClass: ["coupon_choose-list"],
    on: {
      "click": function($event) {
        _vm.swichNav(0)
      }
    }
  }, [_c('text', {
    class: [_vm.currentTab == 0 ? 'coupon_choose_title' : 'coupon_choose_title_no']
  }, [_vm._v("满减券")]), _c('div', {
    class: [_vm.currentTab == 0 ? 'coupon_choose_line_no' : 'coupon_choose_line']
  })]), _c('div', {
    staticClass: ["coupon_choose-list"],
    on: {
      "click": function($event) {
        _vm.swichNav(1)
      }
    }
  }, [_c('text', {
    class: [_vm.currentTab == 1 ? 'coupon_choose_title' : 'coupon_choose_title_no']
  }, [_vm._v("折扣券")]), _c('div', {
    class: [_vm.currentTab == 1 ? 'coupon_choose_line_no' : 'coupon_choose_line']
  })]), _c('div', {
    staticClass: ["coupon_choose-list"],
    on: {
      "click": function($event) {
        _vm.swichNav(2)
      }
    }
  }, [_c('text', {
    class: [_vm.currentTab == 2 ? 'coupon_choose_title' : 'coupon_choose_title_no']
  }, [_vm._v("兑换券")]), _c('div', {
    class: [_vm.currentTab == 2 ? 'coupon_choose_line_no' : 'coupon_choose_line']
  })])]), _c('slider', {
    staticClass: ["swiper-box"],
    style: {
      height: _vm.allHeight
    },
    attrs: {
      "index": _vm.currentTab
    },
    on: {
      "change": _vm.bindChange
    }
  }, [_c('div', {
    staticClass: ["swiper-item-box"]
  }, [(_vm.fullReductionCouponList.length > 0 && _vm.currentTab == 0) ? _c('div', {
    staticClass: ["coupon-shopList", "bs"]
  }, [_c('div', {
    staticClass: ["coupon-couponList-top"]
  }, [_c('image', {
    staticClass: ["mchLogo"],
    attrs: {
      "src": _vm.coupon.mchLogo
    }
  }), _c('text', {
    staticClass: ["mchName"]
  }, [_vm._v(_vm._s(_vm.coupon.mchName))])]), _c('list', {
    staticStyle: {
      flex: "1"
    }
  }, _vm._l((_vm.fullReductionCouponList), function(item, index) {
    return _c('cell', {
      appendAsTree: true,
      attrs: {
        "append": "tree"
      }
    }, [_c('div', {
      staticClass: ["coupon-couponList"]
    }, [_c('div', {
      staticClass: ["coupon-couponList-port1"]
    }, [_c('div', {
      staticClass: ["coupon-couponList-port1-inner"]
    }, [_c('text', {
      staticClass: ["coupon-couponList-port1-text1"]
    }, [_vm._v("￥")]), _c('text', {
      staticClass: ["coupon-couponList-port1-text2"]
    }, [_vm._v(_vm._s(item.amount))])])]), _c('div', {
      staticClass: ["coupon-couponList-port2"]
    }, [_c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text1"]
    }, [_vm._v(_vm._s(item.name))])]), _c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text2"]
    }, [_vm._v("适用范围：" + _vm._s(item.tag))])]), _c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text3"]
    }, [_vm._v("有限期至" + _vm._s(item.endDate))])])])])])
  }))]) : _vm._e(), (_vm.fullReductionCouponList.length > 0 && _vm.currentTab == 0) ? _c('div', {
    staticClass: ["gap"]
  }) : _vm._e(), (_vm.fullReductionCouponList.length === 0 && _vm.currentTab == 0) ? _c('div', {
    staticClass: ["coupon-none"]
  }, [_c('image', {
    staticClass: ["coupon-none-image"],
    attrs: {
      "src": "https://rzico.oss-cn-shenzhen.aliyuncs.com/none-data/kongneirong.png"
    }
  }), _vm._m(0)]) : _vm._e(), (_vm.discountCouponList.length > 0 && _vm.currentTab == 1) ? _c('div', {
    staticClass: ["coupon-shopList", "bs"]
  }, [_c('div', {
    staticClass: ["coupon-couponList-top"]
  }, [_c('image', {
    staticClass: ["mchLogo"],
    attrs: {
      "src": _vm.coupon.mchLogo
    }
  }), _c('text', {
    staticClass: ["mchName"]
  }, [_vm._v(_vm._s(_vm.coupon.mchName))])]), _c('list', _vm._l((_vm.discountCouponList), function(item, index) {
    return _c('cell', {
      appendAsTree: true,
      attrs: {
        "append": "tree"
      }
    }, [_c('div', {
      staticClass: ["coupon-couponList"]
    }, [_c('div', {
      staticClass: ["coupon-couponList-port1"]
    }, [_c('div', {
      staticClass: ["coupon-couponList-port1-inner"]
    }, [_c('text', {
      staticClass: ["coupon-couponList-port1-text2"]
    }, [_vm._v(_vm._s(item.amount))]), _c('text', {
      staticClass: ["coupon-couponList-port1-text1"]
    }, [_vm._v("折")])])]), _c('div', {
      staticClass: ["coupon-couponList-port2"]
    }, [_c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text1"]
    }, [_vm._v(_vm._s(item.name))])]), _c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text2"]
    }, [_vm._v("适用范围：" + _vm._s(item.tag))])]), _c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text3"]
    }, [_vm._v("有限期至" + _vm._s(item.endDate))])])])])])
  }))]) : _vm._e(), (_vm.discountCouponList.length > 0 && _vm.currentTab == 1) ? _c('div', {
    staticClass: ["gap"]
  }) : _vm._e(), (_vm.discountCouponList.length == 0 && _vm.currentTab == 1) ? _c('div', {
    staticClass: ["coupon-none"]
  }, [_c('image', {
    staticClass: ["coupon-none-image"],
    attrs: {
      "src": "https://rzico.oss-cn-shenzhen.aliyuncs.com/none-data/kongneirong.png"
    }
  }), _c('text', {
    staticClass: ["coupon-none-text"]
  }, [_vm._v("您还没有相关的折扣券")])]) : _vm._e(), (_vm.exchangeCouponList.length > 0 && _vm.currentTab == 2) ? _c('div', {
    staticClass: ["coupon-shopList", "bs"]
  }, [_c('div', {
    staticClass: ["coupon-couponList-top"]
  }, [_c('image', {
    staticClass: ["mchLogo"],
    attrs: {
      "src": _vm.coupon.mchLogo
    }
  }), _c('text', {
    staticClass: ["mchName"]
  }, [_vm._v(_vm._s(_vm.coupon.mchName))])]), _c('list', {
    staticStyle: {
      flex: "1"
    }
  }, _vm._l((_vm.exchangeCouponList), function(item, index) {
    return _c('cell', {
      appendAsTree: true,
      attrs: {
        "append": "tree"
      }
    }, [_c('div', {
      staticClass: ["coupon-couponList"]
    }, [_c('div', {
      staticClass: ["coupon-couponList-port1"]
    }, [_c('image', {
      staticStyle: {
        width: "130px",
        height: "130px",
        borderRadius: "6px"
      },
      attrs: {
        "src": item.productThumbnail
      }
    })]), _c('div', {
      staticClass: ["coupon-couponList-port2"]
    }, [_c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text1"]
    }, [_vm._v("兑换:" + _vm._s(item.name))])]), _c('div', [_c('text', {
      staticClass: ["coupon-couponList-port2-text3"]
    }, [_vm._v("有限期至 " + _vm._s(item.endDate))])])]), _c('div', {
      staticClass: ["coupon-couponList-port3"],
      on: {
        "click": function($event) {
          _vm.useCoupon(item.productId)
        }
      }
    }, [_c('text', {
      staticClass: ["coupon-couponList-port3_Title"]
    }, [_vm._v("去使用")])])])])
  }))]) : _vm._e(), (_vm.exchangeCouponList.length > 0 && _vm.currentTab == 2) ? _c('div', {
    staticClass: ["gap"]
  }) : _vm._e(), (_vm.exchangeCouponList.length == 0 && _vm.currentTab == 2) ? _c('div', {
    staticClass: ["coupon-none"]
  }, [_c('image', {
    staticClass: ["coupon-none-image"],
    attrs: {
      "src": "https://rzico.oss-cn-shenzhen.aliyuncs.com/none-data/kongneirong.png"
    }
  }), _c('text', {
    staticClass: ["coupon-none-text"]
  }, [_vm._v("您还没有相关的兑换券")])]) : _vm._e()])])], 1)
},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', [_c('text', {
    staticClass: ["coupon-none-text"]
  }, [_vm._v("您还没有相关的优惠券")])])
}]}
module.exports.render._withStripped = true

/***/ }),

/***/ "./src/api/cart.js":
/*!*************************!*\
  !*** ./src/api/cart.js ***!
  \*************************/
/*! exports provided: add, buyNow, getCart, count, del, update, buyForOrder, buyNowForGroupBuy */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buyNow", function() { return buyNow; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCart", function() { return getCart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "del", function() { return del; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "update", function() { return update; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buyForOrder", function() { return buyForOrder; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buyNowForGroupBuy", function() { return buyNowForGroupBuy; });
/* harmony import */ var _utils_request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/request */ "./src/utils/request.js");

function add(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/add',
    method: 'post',
    params: params
  });
} //立即购买

function buyNow(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/buyNow',
    method: 'post',
    params: params
  });
} //获取购物车信息

function getCart(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/getCart',
    method: 'get',
    params: params
  });
} //获取购物车信息

function count(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/count',
    method: 'get',
    params: params
  });
} //获取购物车信息

function del(ids) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/del/' + ids,
    method: 'post'
  });
} //获取购物车信息

function update(data) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/update',
    method: 'post',
    data: data
  });
}
function buyForOrder(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/buyForOrder',
    method: 'post',
    params: params
  });
}
function buyNowForGroupBuy(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/cart/buyNowForGroupBuy',
    method: 'post',
    params: params
  });
}

/***/ }),

/***/ "./src/api/coupon.js":
/*!***************************!*\
  !*** ./src/api/coupon.js ***!
  \***************************/
/*! exports provided: create, list, couponCount */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "create", function() { return create; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "list", function() { return list; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "couponCount", function() { return couponCount; });
/* harmony import */ var _utils_request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/request */ "./src/utils/request.js");

function create(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/member/couponCode/create',
    method: 'post',
    params: params
  });
}
function list(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/member/couponCode/list',
    method: 'get',
    params: params
  });
}
function couponCount() {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/member/couponCode/count',
    method: 'get'
  });
}

/***/ }),

/***/ "./src/api/product.js":
/*!****************************!*\
  !*** ./src/api/product.js ***!
  \****************************/
/*! exports provided: list, find */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "list", function() { return list; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
/* harmony import */ var _utils_request__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/request */ "./src/utils/request.js");

function list(params) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/product/list',
    method: 'get',
    params: params
  });
}
function find(id) {
  return Object(_utils_request__WEBPACK_IMPORTED_MODULE_0__["default"])({
    url: '/product/find/' + id,
    method: 'get'
  });
}

/***/ }),

/***/ "./src/components/myNavbar/myNavbar.vue":
/*!**********************************************!*\
  !*** ./src/components/myNavbar/myNavbar.vue ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __vue_exports__, __vue_options__
var __vue_styles__ = []

/* styles */
__vue_styles__.push(__webpack_require__(/*! !../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader!../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter?id=data-v-0ae5e94f!../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=styles&index=0!./myNavbar.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-0ae5e94f!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/components/myNavbar/myNavbar.vue")
)

/* script */
__vue_exports__ = __webpack_require__(/*! !../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader!babel-loader!../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=script&index=0!./myNavbar.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib/index.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/components/myNavbar/myNavbar.vue")

/* template */
var __vue_template__ = __webpack_require__(/*! !../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler?id=data-v-0ae5e94f!../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=template&index=0!./myNavbar.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-0ae5e94f!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/components/myNavbar/myNavbar.vue")
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
  typeof __vue_exports__.default === "object" ||
  typeof __vue_exports__.default === "function"
) {
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {eeuiLog.error("named exports are not supported in *.vue files.")}
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
  __vue_options__ = __vue_options__.options
}
__vue_options__.__file = "/Users/zhangsr/Documents/GitHub/rzico-boot-eeui/src/components/myNavbar/myNavbar.vue"
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
__vue_options__._scopeId = "data-v-0ae5e94f"
__vue_options__.style = __vue_options__.style || {}
__vue_styles__.forEach(function (module) {
  for (var name in module) {
    __vue_options__.style[name] = module[name]
  }
})
if (typeof __register_static_styles__ === "function") {
  __register_static_styles__(__vue_options__._scopeId, __vue_styles__)
}

module.exports = __vue_exports__


/***/ }),

/***/ "./src/entry.js":
/*!**********************!*\
  !*** ./src/entry.js ***!
  \**********************/
/*! no static exports found */
/***/ (function(module, exports) {

// 注意：修改此文件需要重新执行npm才会生效
// 注册全局组件示例
// import headNav from './components/headNav'
// Vue.component('headNav', headNav);

/***/ }),

/***/ "./src/pages/member/coupon/coupon.vue?entry=true":
/*!*******************************************************!*\
  !*** ./src/pages/member/coupon/coupon.vue?entry=true ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var __vue_exports__, __vue_options__
var __vue_styles__ = []

/* styles */
__vue_styles__.push(__webpack_require__(/*! !../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader!../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter?id=data-v-358ef8fe!../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=styles&index=0!./coupon.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/style-rewriter.js?id=data-v-358ef8fe!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=styles&index=0!./src/pages/member/coupon/coupon.vue")
)

/* script */
__vue_exports__ = __webpack_require__(/*! !../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader!babel-loader!../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=script&index=0!./coupon.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/script-loader.js!../../../../../usr/local/lib/node_modules/eeui-cli/node_modules/_babel-loader@8.2.2@babel-loader/lib/index.js!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=script&index=0!./src/pages/member/coupon/coupon.vue")

/* template */
var __vue_template__ = __webpack_require__(/*! !../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler?id=data-v-358ef8fe!../../../../../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector?type=template&index=0!./coupon.vue */ "../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/template-compiler.js?id=data-v-358ef8fe!../../../../../usr/local/lib/node_modules/eeui-cli/lib/loaders/eeui-loader/lib/selector.js?type=template&index=0!./src/pages/member/coupon/coupon.vue")
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
  typeof __vue_exports__.default === "object" ||
  typeof __vue_exports__.default === "function"
) {
if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {eeuiLog.error("named exports are not supported in *.vue files.")}
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
  __vue_options__ = __vue_options__.options
}
__vue_options__.__file = "/Users/zhangsr/Documents/GitHub/rzico-boot-eeui/src/pages/member/coupon/coupon.vue"
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
__vue_options__._scopeId = "data-v-358ef8fe"
__vue_options__.style = __vue_options__.style || {}
__vue_styles__.forEach(function (module) {
  for (var name in module) {
    __vue_options__.style[name] = module[name]
  }
})
if (typeof __register_static_styles__ === "function") {
  __register_static_styles__(__vue_options__._scopeId, __vue_styles__)
}

module.exports = __vue_exports__
module.exports.el = 'true'
new Vue(module.exports)


/***/ }),

/***/ "./src/utils/request.js":
/*!******************************!*\
  !*** ./src/utils/request.js ***!
  \******************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/**
 * Created by zhangsr on 2020/7/6.
 */
var stream = weex.requireModule('stream') || {};
var eeui = app.requireModule('eeui');

var Json2Url = function Json2Url(data) {
  try {
    var tempArr = [];

    for (var i in data) {
      var key = i;
      var value = encodeURIComponent(data[i]);
      tempArr.push(key + '=' + value);
    }

    var urlParamsStr = tempArr.join('&');
    return urlParamsStr;
  } catch (err) {
    return '';
  }
};

var request = function request(data) {
  var _this = this;

  return new Promise(function (resolve, reject) {
    var gdata = eeui.getCachesString("globalData", '');
    var globalData = JSON.parse(gdata);
    var token = globalData.token; // globalData.APP_BASE_API

    var APP_BASE_API = globalData.APP_BASE_API; // var APP_BASE_API ='https://api.365.qmin365.cn:8443'

    var header = {};

    if (token != null) {
      header = {
        'Authorization': token,
        'Content-Type': 'application/json'
      };
    }

    var url = data.url;

    if (data.params != null && data.params != undefined) {
      var params = Json2Url(data.params);

      if (url.indexOf('?') >= 0) {
        url = url + '&' + params;
      } else {
        url = url + '?' + params;
      }
    }

    stream.fetch({
      headers: header,
      method: data.method,
      url: APP_BASE_API + url,
      type: 'json',
      body: data.data,
      timeout: 20000
    }, function (ret) {
      // eeuiLog.log(ret)
      if (!ret.ok) {
        eeui.toast({
          message: '请求出错',
          gravity: 'middle'
        });
        reject(ret.statusText);
      } else {
        if (ret.data.type == "error") {
          eeui.toast({
            message: ret.data.content,
            gravity: 'middle'
          });
          reject(ret.data);
        } else {
          resolve(ret.data);
        }
      }
    });
  });
};

/* harmony default export */ __webpack_exports__["default"] = (request);

/***/ })

/******/ });